package com.ssy.lingxi.platform.template.service.repository;

import com.ssy.lingxi.platform.template.service.entity.collect.MemberPurchaseCollect;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;


@Repository
public interface MemberPurchaseCollectRepository extends JpaRepository<MemberPurchaseCollect, Long> {

    void deleteByPurchaseIdAndMemberIdAndUserId(Long purchaseId, Long memberId, Long userId);

    Page<MemberPurchaseCollect> findAllByMemberIdAndUserId(Long memberId, Long userId, Pageable page);

    Boolean existsByPurchaseIdAndMemberIdAndUserId(Long purchaseId, Long memberId, Long userId);
}
